package org.starsource.forum.client.web;

import java.util.Set;

import org.starsource.forum.client.domain.CategoryObject;
import org.starsource.forum.client.domain.MessageObject;
import org.starsource.forum.client.domain.SessionObject;
import com.google.gwt.user.client.rpc.AsyncCallback;

public interface ForumServiceAsync {

	public void getCategorySet(AsyncCallback<Set<CategoryObject>> callback);

	public void getSessionSet(AsyncCallback<Set<SessionObject>> callback);

	public void getSessionSet(int categoryId, AsyncCallback<Set<SessionObject>> callback);

	public void getSessionSetWithinCategory(int categoryId, AsyncCallback<Set<SessionObject>> callback);

	public void getSessionSetKeywords(String keywords, AsyncCallback<Set<SessionObject>> callback);

	public void getSessionDetail(int sessionId, AsyncCallback<SessionObject> callback);

	public void createSession(String title, String content, int categoryId, AsyncCallback<SessionObject> callback);

	public void followSession(String content, int sessionId, AsyncCallback<MessageObject> callback);

	public void removeSession(int sessionId, AsyncCallback<Void> callback);

	public void removeMessage(int messageId, AsyncCallback<Void> callback);

	public void removeResource(int resourceId, AsyncCallback<Void> callback);

	public void removeResources(Set<Integer> resourceIdSet, AsyncCallback<Void> callback);

	public void updateMessage(String content, int messageId, AsyncCallback<Void> callback);

	public void updateTitle(String title, int sessionId, AsyncCallback<Void> callback);

}
